﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace uVirtualWeb.List
{
    public partial class Musica : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CarregaLista();
            }
        }

        private void CarregaLista()
        {
            lstMusicas.DataSource = new WBGDal.DalMusica().Listar("idMusica <= 10");
            lstMusicas.DataBind();
            upMusicas.Update();
        }

        protected void btnOuvir_Click(object sender, CommandEventArgs e)
        {
            if (e.CommandName == "Ouvir")
            {
                ltrPlayer.Text = "<embed src='http://www.4shared.com/flash/player.swf?ver=9051' flashvars='file=" + e.CommandArgument + ";volume=50&amp;autostart=true' height='20' width='295' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='false'></embed>";
            }
        }
    }
}